var shopId = null;
$(function() {
	var validator3 = $("#form").validate(
			{
				validClass : 'checked',
				rules : {
					getOrderInterval : {
						required : true,
						range : [ 15, 90 ]
					}

				},
				messages : {},
				submitHandler : function(form) {
					var shopId = $("#shopId").val();
					var getOrderInterval = $("#getOrderInterval").val();

					Call.ajaxSend('member/shopaccount.php', '&shopId='
							+ shopId + '&getOrderInterval=' + getOrderInterval,
							function(d) {
								if (d.success) {
									Call.httpLoad();
								} else {
									alert(d.msg);
								}
							});
				},
				errorPlacement : function(error, element) {
					if (element.is(":radio"))
						error.appendTo(element.parent().next().next());
					else if (element.is(":checkbox"))
						error.appendTo(element.next());
					else {
						error.appendTo(element.closest(".form-group"));
					}
				},
				success : function(label) {
					label.remove();
				}
			});

	$(".setting").click(function() {
		shopId = $(this).attr("shopId");
		$("#shopId").val(shopId);
	});
});

function shopEditor() {
	/*Call.httpSend('/member/shopaccount_edit.php?shopId=' + shopId, null, function(d) {*/
		$('#shopedit .modal-dialog').html(d);
		alert("111");
		$('#shopedit').modal('toggle');
	/*});*/
}

function addressEditor(id){
		$('#shopedit').modal('toggle');
		alert(id);
}

function shopset(id){
		$('#shop_seeting').modal('toggle');
		alert(id);
}